package com.hsteach.dao.domain.equipment;

import com.hsteach.common.annotation.Excel;
import com.hsteach.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * 设备维修结果信息  tb_equipment_repair_result_info
 */

@Data
public class EquipmentRepairResult extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long id;

    /** 报修填报信息id */
    @Excel(name = "报修填报信息id")
    private Long repairId;

    /** 维修人id */
    @Excel(name = "维修人id")
    private String personId;

    /** 维修人名称 */
    @Excel(name = "维修人名称")
    private String personName;

    /** 维修人电话号码 */
    @Excel(name = "维修人电话号码")
    private String personMobile;


    /** 维修描述 */
    @Excel(name = "维修描述")
    private String repairDesc;

    /** 创建时间  */
    @Excel(name = "创建时间 ")
    private Date createTime;

    /** 更新时间  */
    @Excel(name = "更新时间 ")
    private Date updateTime;

    /** 是否有效 1有效 0无效 */
    @Excel(name = "是否有效 1有效 0无效")
    private Integer delStatus;

    /** 机构号 */
    @Excel(name = "机构号")
    private String orgCode;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("repairId", getRepairId())
                .append("repairDesc", getRepairDesc())
                .append("personId", getPersonId())
                .append("personName", getPersonName())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("orgCode", getOrgCode())
                .append("delStatus", getDelStatus())
                .toString();
    }

    public Map<String,Object> toMap(){
        Map<String, Object> map = new HashMap<>(16);
        map.put("id",getId());
        map.put("repairId", getRepairId());
        map.put("repairDesc", getRepairDesc());
        map.put("personId", getPersonId());
        map.put("personName", getPersonName());
        map.put("createTime", getCreateTime());
        map.put("updateTime", getUpdateTime());
        map.put("orgCode", getOrgCode());
        map.put("delStatus", getDelStatus());

        return map;
    }
}
